<%@ page import="com.zzty.entity.User" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.1.0/css/bootstrap.min.css">
    <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script src="https://cdn.bootcss.com/popper.js/1.12.5/umd/popper.min.js"></script>
    <script src="https://cdn.bootcss.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="../js/jquery-1.7.min.js"></script>
    <script type="text/javascript" src="../js/jquery-ui-1.8.16.custom.min.js"></script>
    <script type="text/javascript" src="../js/jquery.cookie.js"></script>
    <script type="text/javascript" src="../js/jquery.alerts.js"></script>
    <script type="text/javascript" src="../js/jquery.uniform.min.js"></script>
    <script type="text/javascript" src="../js/general.js"></script>
    <script type="text/javascript" src="../js/blog.js"></script>
    <title>课堂分享</title>
    <link rel="stylesheet" href="../css/style.default.css" type="text/css" />
    <!--[if lte IE 8]><script language="javascript" type="text/javascript" src="js/plugins/excanvas.min.js"></script><![endif]-->
    <!--[if IE 9]>
    <link rel="stylesheet" media="screen" href="../css/style.ie9.css"/>
    <![endif]-->
    <!--[if lt IE 9]>
    <![endif]-->
    <link rel="stylesheet" media="screen" href="../css/style.ie8.css"/>
    <!--[if lt IE 9]>
    <script src="js/plugins/css3-mediaqueries.js"></script>
    <![endif]-->

    <script type="text/javascript">
        var path = '<%=request.getContextPath()%>';</script>
    <script src="../js/change.js"></script>

    <script>

        function initDate(){
            var date = new Date();
            var seperator1 = "-";
            var year = date.getFullYear();
            var month = date.getMonth() + 1;
            var strDate = date.getDate();
            if (month >= 1 && month <= 9) {
                month = "0" + month;
            }
            if (strDate >= 0 && strDate <= 9) {
                strDate = "0" + strDate;
            }
            var currentdate = year + seperator1 + month + seperator1 + strDate;

            $(document.getElementById("tdate")).val(currentdate);
            var date = document.getElementById("tdate").value;
            ajaxCall("GET",path+"/ShareServlet?method=searchToday&date="+date,getResult);
        }

function  getResult(res) {
    var obj = JSON.parse(res);
    document.getElementById("tquestion").value=obj ;

}
    </script>
    <script src="../js/ajaxAPI.js"></script>
</head>

<body class="withvernav" onload="initDate()">


<div class="bodywrapper">
    <div class="topheader">
        <div class="left">
            <h1 class="logo"><span>ZZTY</span></h1>
            <span class="slogan">自在天原学习系统</span>



            <br clear="all" />

        </div><!--left-->
        <% User user=(User)session.getAttribute("user");
        %>
        <div class="right">
            <!--<div class="notification">
                <a class="count" href="ajax/notifications.html"><span>9</span></a>
            </div>-->
            <div class="userinfo">
                <img src="../images/thumbs/avatar.png" alt="" />
                <span><%=user.getName()%></span>
            </div><!--userinfo-->

            <div class="userinfodrop">
                <div class="avatar">
                    <a href=""><img src="../images/thumbs/avatarbig.png" alt="" /></a>

                </div><!--avatar-->
                <div class="userdata">

                    <ul>
                        <li>名字:<%=user.getName()%></li>
                        <li>班级:java<%=user.getClassId()%>班</li>
                        <li>邮箱:<%=user.getEmail()%></li>
                        <li>类型:<%=user.getType()%></li>
                        <li><a href="change.jsp">修改信息</a></li>
                        <li><a href="../login.jsp">退出</a></li>
                    </ul>
                </div><!--userdata-->
            </div><!--userinfodrop-->
        </div><!--right-->
    </div><!--topheader-->


    <div class="header">
        <ul class="headermenu">
            <li><a href="Smain.jsp"><span class="icon icon-flatscreen"></span>首页</a></li>
            <li ><a href="todayTeamExam.jsp"><span class="icon icon-pencil"></span>结对</a></li>
            <li ><a href="todayExam.jsp"><span class="icon icon-message"></span>竞赛</a></li>
            <li class="current"><a href="share1.jsp"><span class="icon icon-chart"></span>课堂分享</a></li>
        </ul>



    </div><!--header-->

    <div class="vernav">
        <ul>
            <li><a href="todayTeamExam.jsp">结对</a></li>
            <li><a href="todayExam.jsp">竞赛</a></li>
            <li class="current"><a href="share1.jsp" class="editor">课堂分享</a></li>
            <li><a href="historyShare.jsp">历史分享</a></li>
        </ul>
        <a class="togglemenu"></a>
    </div><!--leftmenu-->

    <div class="centercontent">

        <div class="pageheader">
            <h1 class="pagetitle">今日分享：</h1>
            <span class="pagedesc">
                <hr/>
                <table>
                    <tr>
                        <td><h3>* 日期：</h3></td>
                        <td><input type="date" id="tdate" disabled/></td>
                    </tr>
                    <br/>
                    <tr>
                        <td><h3>* 分享内容：</h3></td>
                        <td><textarea id="tquestion" rows="3" cols="20" style="margin: 0px; width: 999px; height: 400px;font-size:15px; color:#333333"></textarea></td>
                    </tr>


                </table>

            </span>


        </div><!--pageheader-->


        <style>
            td{
                text-align:left;
                vertical-align:top;

            }
            input[type="button"] {
                width: auto;
                margin: 0;
                font-weight: bold;
                color: #eee;
                background: #FB9337;
                border: 1px solid #F0882C;
                padding: 7px 10px;
                -moz-box-shadow: none;
                -webkit-box-shadow: none;
                box-shadow: none;
                cursor: pointer;
                -moz-border-radius: 2px;
                -webkit-border-radius: 2px;
                border-radius: 2px;
            }
        </style>

</body>
</html>
